package com.jt.demo;

import org.springframework.stereotype.Component;

@Component  //将类交给spring容器管理  key=dog value=反射后的对象
public class Dog implements Pet{
    @Override
    public void hello() {
        System.out.println("狗狗旺旺交");
    }
}
